<?
 require_once("../users/users.php");
 require_once("email.php");
 
 $results = getEmailEntry($_GET['addressid']);
 
 $row = $results->fetch_assoc();
 
?>

<!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title><?=$title ?> Edit Customer: <?=$row['Customer_Name_id'] ?></title>
         <? require('../inc/header-info.php'); ?>
    </head>
    <body>
        <div class="container">
            <? include('../inc/nav.php'); ?>
            
			<h4>Edit Email Contact:</h4>
   	  		<form class="form-inline"  name="UpdateEmail" method="post" action="email-edit.php">
  				<div class="input-append">
  				<input type="hidden" name="UpdateEmail" value='1'>
  			    <input type="hidden" name="id" value='<?=$row['id'] ?>'>
  			    <input type="hidden" name="Customer_id" value='<?=$row['Customer'] ?>'>
    			<input type="number" name="Email" class="span3" value='<?=$row['address'] ?>'>
    			<select name='contact_type_id' class="span2">
    				<option value='<?=$row['Contact_type_id'] ?>'><?=$row['Contact'] ?></option>
    				<option value='20'>Personal Email</option>
  					<option value='19'>Work Email</option>
				</select>
    			<button type="submit" class="btn">Update Email</button>
  				</div> 
  			</form>
  		</div>
	</body>
</html>